const { defineConfig } = require('@vue/cli-service');

module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    // proxy: 'http://localhost:3000',
    proxy: {
      '/dev1': {
        // http://localhost:3000/abc/v1/users
        target: 'http://localhost:3000',
        ws: false,
        changeOrigin: true,
        pathRewrite: { '^/dev1': '' },
      },
      '/dev2': {
        // http://localhost:3001/efg/users
        target: 'http://localhost:3001',
        ws: false,
        changeOrigin: true,
        pathRewrite: { '^/dev2': '' }, // '/efg/users'.replace(/^\/efg/,'')
      },

    },
  },
});
